Name :Read axis information commands
Symbol :MC_ReadAxisInfo
Illustrate:
Used to read axis information, active high.
VALID: If TRUE is output, the axis information is read.
There is no interrupt flag for this command, and multiple commands can be run at the same time.
Image:
Parameter:
| The name of the parameter | data type | IN/OUT | Parameter role | Illustrate | Default value |
|---|---|---|---|---|---|
| AXISNO | UDINT | IN | Pulse shaft number | 0-7 | not |
| ENABLE | BOOL | IN | The function block is enabled | TRUE:The function block is enabled | FALSE |
| VALID | BOOL | OUT | Valid signs | TRUE:Reading axis information is valid | FALSE |
| BUSY | BOOL | OUT | Busy sign | TRUE:Read the axis information | FALSE |
| ERROR | BOOL | OUT | Error flags | TRUE:There was an error with the function block call | >FALSE |
| ERRORID | UINT | OUT | Error codes | 0:Normal, Other: Error code value | 0 |
| POWERON | BOOL | OUT | Axis enable flags | TRUE:The axis is enabled | FALSE |
| HOMED | BOOL | OUT | Back to origin logo | TRUE:Returned to the original (or axis position set) | FALSE |
| SOFTPOSLIMIT | BOOL | OUT | The software is triggering the flag at the positive limit | TRUE:The software positive limit has been triggered | FALSE |
| SOFTNEGLIMIT | BOOL | OUT | Software negative limit trigger flag | TRUE:The software negative limit has been triggered | FALSE |
Example:
LD:
ST:
Interpretation:
AXISNO is 0, which means that the operating pulse axis is 0; ENABLE is TRUE, and the command to read the axis information is started. If ValidOut is set to TRUE, the axis information is valid. BusyOut is TRUE, which means that the axis information is read, and BusyOut is reset after completion. If ErrorOut is TURE, it indicates that there is an error and cannot be executed. If ErrorIdOut is 0, the execution is normal, and if it is not 0, there is an error and cannot be executed. If PowerOnOut is TRUE, the axis is enabled. IsHomedOut is TRUE, which means that the axis has been returned to its original (or the axis position has been set); SoftPosLimitOut is TRUE, which means that the current position of the axis has triggered the software positive limit. If SoftNegLimitOut is TRUE, the current position of the axis has triggered a software negative limit